package com.shuogesha.platform.feign;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.shuogesha.common.util.JsonResult;
import com.shuogesha.common.util.ResultCode;
import com.shuogesha.platform.client.DictionaryFeignClient;
import com.shuogesha.platform.entity.Dictionary;

@RestController
@RequestMapping("/api/")
public class DictionaryCommonFeignAct {
	
	@RequestMapping(value = "get_dictionary_list")
 	public @ResponseBody Object get_dictionary(String code) throws Exception {
		Map<String, Object> map = new HashMap<>();
		List<Dictionary> list = dictionaryFeignClient.findByCode(code); 
		return  new JsonResult(ResultCode.SUCCESS, list);
	}
	@Autowired
	public DictionaryFeignClient dictionaryFeignClient;
}
